.. _syntax-error,-unexpected-token-"match",-expecting-"(": syntax error, unexpected token "match", expecting "(" ----------------------------------------------------- .. meta:: :description: syntax error, unexpected token "match", expecting "(": Since ``match`` was introduced as a PHP keyword, it cannot be used anymore to name a class, interface, enum, trait, function or global constant. :og:image: https://php-errors.readthedocs.io/en/latest/_static/logo.png :og:type: article :og:title: syntax error, unexpected token "match", expecting "(" :og:description: Since ``match`` was introduced as a PHP keyword, it cannot be used anymore to name a class, interface, enum, trait, function or global constant :og:url: https://php-errors.readthedocs.io/en/latest/messages/syntax-error%2C-unexpected-token-%22match%22%2C-expecting-%22%28%22.html :og:locale: en :twitter:card: summary_large_image :twitter:site: @exakat :twitter:title: syntax error, unexpected token "match", expecting "(" :twitter:description: syntax error, unexpected token "match", expecting "(": Since ``match`` was introduced as a PHP keyword, it cannot be used anymore to name a class, interface, enum, trait, function or global constant :twitter:creator: @exakat :twitter:image:src: https://php-errors.readthedocs.io/en/latest/_static/logo.png .. raw:: html Description ___________ Since ``match`` was introduced as a PHP keyword, it cannot be used anymore to name a class, interface, enum, trait, function or global constant. It may be used to name a class constant, method or property. Example _______ .. code-block:: php Solutions _________ + Change the name ``match``. + Make the function a method in a class.